#include <stdio.h>
#include <stdlib.h>

#define MIN_M 2
#define MAX_M 100

#define MIN_N 1
#define MAX_N 100

#define MIN_V -10000
#define MAX_V 10000

#define CASES 100

int gen_int(int minv, int maxv)
{
    return minv + rand() % (maxv - minv + 1);
}

int main()
{
    int t, i;
    for (t = 0; t < CASES; t++)
    {
        int n = gen_int(MIN_N, MAX_N);
        int m = gen_int(MIN_M, MAX_M);
        printf("%d %d\n", n, m);
        for (i = 0; i < n; i++)
        {
            printf("%d ", gen_int(MIN_V, MAX_V));
        }
        printf("\n\n");
    }
    return 0;
}